/*
   @Copyright:LibreOJ
   @Author:   tjyemail
   @Problem:  https://loj.ac/problem/6
   @Language: C++
   @Datetime: 20-07-30 17:07
   */
// binary search
// interaction : int get_num(); int guess(int index, int num); void submit(vector<int>);

#include <bits/stdc++.h>
#include "interaction.h"
using namespace std;
int solve(int index) {
	int l = 1, r = 1000000;
	for (int m; l != r;) {
		m = (l + r) / 2;
		switch (guess(index, m)) {
			case 1:
				r = m - 1;
				break;
			case -1:
				l = m + 1;
				break;
			case 0: return m;
		}
	}
	return l;
}
int main(){
	int n = get_num();
	vector<int> v(n, 1);
	for(int i=0; i<n; ++i)
		v[i]=solve(i);
	submit(v);
	return 0;
}
